#include<QApplication>
#include<QMessageBox>
#include <iostream>

#include<QList>
#include<QUrl>

#include"Player/Player.h"
#include"Player/Playlist.h"

#include"GUI/MainWindow.h"

#include"Proxy/Proxy.h"

using namespace std;

int main(int argc, char *argv[])
{
	QApplication app(argc, argv);
	qsrand(time(0));

	Player *player = new Player(0);

	MainWindow *mainWindow = new MainWindow(0);
	mainWindow->show();

	Proxy::couple(mainWindow, player);

	QList<QUrl> urls;
	urls.push_back(QUrl::fromLocalFile("/home/ruben/Music/Faun - Von den Elben (2013)/01. Mit dem Wind.mp3"));
	urls.push_back(QUrl::fromLocalFile("/home/ruben/Music/Faun - Von den Elben (2013)/02. Diese kalte Nacht.mp3"));
	urls.push_back(QUrl::fromLocalFile("/home/ruben/Music/Faun - Von den Elben (2013)/03. Von den Elben.mp3"));
	urls.push_back(QUrl::fromLocalFile("/home/ruben/Music/Faun - Von den Elben (2013)/04. Tanz mit mir - Duett mit Santiano.mp3"));
	urls.push_back(QUrl::fromLocalFile("/home/ruben/Music/Faun - Von den Elben (2013)/05. Schrei es in die Winde.mp3"));
	urls.push_back(QUrl::fromLocalFile("/home/ruben/Music/Faun - Von den Elben (2013)/06. Wilde Rose.mp3"));
	urls.push_back(QUrl::fromLocalFile("/home/ruben/Music/Faun - Von den Elben (2013)/07. Wenn wir uns wiedersehen.mp3"));
	player->playlist()->insertSongs(urls);

	int ret = app.exec();


	delete player;
	player = 0;

	return ret;
}



